import json

import requests
import random
# requests_urls =set()
# urls = [f'https://httpbin.org/get?value={random.randint(0,10)}'for i in range(10)]
# for url in urls:
#     if url not in requests_urls:
#         requests_urls.add(url)
#         print(requests.get(url).json())
#     else:
#         print('重复请求')
import json
import requests
import random
import hashlib
url = 'http://httpbin.org/post'
# datas = [{'id':101,'value':random.randint(1,10)}for i in range(10)]
#
# request_urls = set()
# for data in datas:
#     data_hash = hashlib.md5(json.dumps(data).encode('utf-8')).hexdigest()
#     if data_hash not in request_urls:
#         request_urls.add(data_hash)
#         res  = requests.post(url,json=data)
#         print(res.json())
#     else:
#         print('重复请求')

py_dict = {'name': '张三', 'age': 18}
print(json.dumps(py_dict,ensure_ascii= False))
# print(json.loads(json.dumps(py_dict)))



